﻿using System.Web.Mvc;
using Zeus.Interop.SampleSite.Helpers;
using Zeus.Interop.SampleSite.Stubs;

namespace Zeus.Interop.SampleSite.Controllers
{
    public class OrderController : Controller
    {
        private readonly ICustomerService _customerSvc;

        public OrderController(ICustomerService customerSvc)
        {
            _customerSvc = customerSvc;
        }

        public OrderController() : this(ServiceLocator.GetService<ICustomerService>())
        {
            
        }

        public ActionResult OrderItemsList()
        {
            return PartialView(_customerSvc.GetOrdersForCustomer(Url.GetCustomerId()));
        }

    }
}
